package com.qfedu.yanglao20app.mine.controller;

import com.qfedu.yanglao20.common.CommonResult;
import com.qfedu.yanglao20app.mine.service.RecordService;
import com.qfedu.yanglao20app.mine.vo.SelectRecordVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "档案信息")
@RestController
@RequestMapping("/record")
public class RecordController {

    @Resource
    private RecordService recordService;

    @ApiOperation(value = "根据id查询档案信息", notes = "根据id查询档案信息")
    @GetMapping("/query")
    public CommonResult<SelectRecordVO> queryHandicapped(@RequestParam @ApiParam("残疾人id") Integer id) {
        SelectRecordVO selectRecordVO = recordService.selectAllById(id);
        return CommonResult.success(selectRecordVO);
    }
}
